xen.git
20 years agoThe attached patch to 1) fix a 64-bit bug with some of the data packing,
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:21:46 +0000 (11:21 +0100)]
The attached patch to 1) fix a 64-bit bug with some of the data packing,
and 2) adds a workaround for an Infineon TPM hardware bug.

Signed-off-by: Vinnie Scarlata, Joseph Cihula (@intel.com)
20 years agofix VMX decoder for MOVZ instruction.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:19:48 +0000 (11:19 +0100)]
fix VMX decoder for MOVZ instruction.

In VMX decoder, we always assume the 2 operands of x86 instructions are
in the same length, however, MOVZ is an exception.
This patch fixes MOVZ instruction handling.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Dan Xu <dan.d.xu@intel.com>
20 years agoJust some small code cleanup to shadow.c, no logic changed.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:18:51 +0000 (11:18 +0100)]
Just some small code cleanup to shadow.c, no logic changed.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoChangeset 7419 introduced a check for DOM0 before setting a bit in the
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 23:08:01 +0000 (00:08 +0100)]
Changeset 7419 introduced a check for DOM0 before setting a bit in the
cpu_present map.  This prevents domU SMP kernels without HOTPLUG_CPU
support from booting.  Secondary cpus need to be present and online
before init/main.c:do_basic_setup() calls init_workqueues() (which
initializes per-cpu workqueues).

Without this patch, non HOTPLUG_CPU enabled kernels hang when flushing
cpu workqueues as the spinlock in the structure is never initialized (it
has a default value of zero which means the lock has been acquired on
x86).

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago>I'm hitting an ASSERT in alloc_monitor_pagetable() with debug=y and I
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 18:13:06 +0000 (19:13 +0100)]
>I'm hitting an ASSERT in alloc_monitor_pagetable() with debug=y and I
>can reproduce the condition when debug isn't on. The monitor_table is
>not zeroed when entering alloc_monitor_pagetable() - this happens when I
>create a vmx guest. I'm not sure why this happening at first glance.
>File: xen/arch/x86/shadow32.c
>Line: 689
>System: VT/VMX FC3 x86_32 (I can reproduce on FC4 x86_64 too)
>ASSERT(pagetable_get_paddr(v->arch.monitor_table) == 0);

Solution:
What happens is that the monitor page table is not zeroed out
during the initial setup for VMX guests.  As a result, at a later
time when we enable shadow mode for these VMX guests, we trip on
the ASSERT problem above.  To fix this, we just need to initialize
the monitor page table to 0 before calling vmx_final_setup_guest()
and enabling shadow mode.

20 years agoFix 'nosmp' and ensure that CPU#0 is reported properly
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 16:49:19 +0000 (17:49 +0100)]
Fix 'nosmp' and ensure that CPU#0 is reported properly
by /proc/cpuinfo. Also fix the sibling and core maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTemporary fix for blkfront failure on save/restore.
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 15:44:25 +0000 (16:44 +0100)]
Temporary fix for blkfront failure on save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix CPU hotplug -- cpu initialisation functions must be declared
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 15:28:20 +0000 (16:28 +0100)]
Fix CPU hotplug -- cpu initialisation functions must be declared
__cpuinit or later hotplug references freed code and data.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 15:02:43 +0000 (16:02 +0100)]
Merged.

20 years agoCatch KeyboardInterrupt, to avoid spewing error messages on Ctrl-C.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 14:57:19 +0000 (15:57 +0100)]
Catch KeyboardInterrupt, to avoid spewing error messages on Ctrl-C.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded missing __init__.py.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 14:24:47 +0000 (15:24 +0100)]
Added missing __init__.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDisable guest firmware apm since no apm is supported now to remove the
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:37:07 +0000 (10:37 +0100)]
Disable guest firmware apm since no apm is supported now  to remove the
apm handle idle request error when guest os boot

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
20 years agoThe following patch adds a section for SHUTDOWN OPTIONS for the xmdomain.cfg
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:36:19 +0000 (10:36 +0100)]
The following patch adds a section for SHUTDOWN OPTIONS for the xmdomain.cfg
man page.  It documents the new set of options introduced over the last few
weeks.

Signed-off-by: Sean Dague <sean@dague.net>
20 years agoFix docs: xm set-mem => xm mem-set.
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:34:34 +0000 (10:34 +0100)]
Fix docs: xm set-mem => xm mem-set.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20 years agoThere is an error in xenstat, such that a wild pointer is being
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:33:22 +0000 (10:33 +0100)]
There is an error in xenstat, such that a wild pointer is being
dereferenced and written to.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
20 years agoFix the DISPLAY configration that breaks vmx domain creation with SDL
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:31:25 +0000 (10:31 +0100)]
Fix the DISPLAY configration that breaks vmx domain creation with SDL
on vncserver or remote X. Changeset 7547 added a test of
opts.vals.display when getenv("DISPLAY"); because there is a default
value:localhost:0, that causes the test always to be true.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoAdd get_cycles(), to be defined in asm/time.h, as a
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:28:41 +0000 (10:28 +0100)]
Add get_cycles(), to be defined in asm/time.h, as a
generic method to access cpu-specific local cycle counter.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:14:59 +0000 (17:14 +0100)]
Merged.

20 years agoMake check_pkgs work with the Bourne shell
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:11:24 +0000 (17:11 +0100)]
Make check_pkgs work with the Bourne shell

20 years agoFrom Murillo Fernandes Bernardes <mfb@br.ibm.com>:
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:10:57 +0000 (17:10 +0100)]
From Murillo Fernandes Bernardes <mfb@br.ibm.com>:

The problem is: There is no mechanism to detect block device setup failure

Network devices have the same problem, and are fixed with this too.

I handling this problem in the way suggested by aliguori:
- hotplug scripts write a "hotplug-status" node on store
- Xend DevController.createDevice() check verify this node and return success
or throw an exception on failure.
- If no changes in "hotplug-status" node after DEVICE_CREATE_TIMEOUT seconds
Xend throw an exception showing the problem with hotplug scripts.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUpdate .hgignore.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:10:41 +0000 (17:10 +0100)]
Update .hgignore.

20 years agoFix PAE shadow on a machine with RAM above 4G on x86_64 xen.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:08:54 +0000 (17:08 +0100)]
Fix PAE shadow on a machine with RAM above 4G on x86_64 xen.
Currently, on a machine with RAM above 4G, we can not run 32bit VMX
guest on x86_64 xen, the root cause is that the PAE page table PDPT must
below 4G, this patch fixes this issue.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoWatch events may get lost, the xenstored response races against the new
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:07:14 +0000 (17:07 +0100)]
Watch events may get lost, the xenstored response races against the new
watch being added to the watch list in register_xenbus_watch().  Fixed
by adding the watch to the list unconditionally, and remove it in the
error case.

20 years agoFrom Gerd Knorr <kraxel@suse.de>:
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:03:13 +0000 (17:03 +0100)]
From Gerd Knorr <kraxel@suse.de>:

Watch events may get lost, the xenstored response races against the new
watch being added to the watch list in register_xenbus_watch().  Fixed
by adding the watch to the list unconditionally, and remove it in the
error case.

That one fixes the network issues I'm seeing.  Due to the race the
"online" hotplug event for the vif backend was lost sometimes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded new xentrace executables tbctl and setsize.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:01:31 +0000 (17:01 +0100)]
Added new xentrace executables tbctl and setsize.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse _p to fix, once and for all, the debugging printf recently changed.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:59:15 +0000 (16:59 +0100)]
Use _p to fix, once and for all, the debugging printf recently changed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved the event server, and all it entails. This is unused, and a big pile
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:56:34 +0000 (16:56 +0100)]
Removed the event server, and all it entails.  This is unused, and a big pile
of crusty rubbish.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved some dead code.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:54:05 +0000 (16:54 +0100)]
Removed some dead code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoIgnore the directories containing generated man pages.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 11:05:49 +0000 (12:05 +0100)]
Ignore the directories containing generated man pages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSanitise the trace-buffer hypervisor<->user interface.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 09:45:31 +0000 (10:45 +0100)]
Sanitise the trace-buffer hypervisor<->user interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove stupid unused strtok() function.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:30:41 +0000 (23:30 +0100)]
Remove stupid unused strtok() function.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify trace header some more, and ensure that
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:28:32 +0000 (23:28 +0100)]
Simplify trace header some more, and ensure that
construction of arguments for tracing is outlined from
straightline code paths.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTracing cleanups and simplify tb_set_size(). Dynamic
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:17:58 +0000 (23:17 +0100)]
Tracing cleanups and simplify tb_set_size(). Dynamic
buffer shrinking is unsafe without heavier weight SMP
synchronisation.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove trace compile option from Xen.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 21:35:06 +0000 (22:35 +0100)]
Remove trace compile option from Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis is a set of changes which allow the tracebuffer functionality to
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 21:31:45 +0000 (22:31 +0100)]
This is a set of changes which allow the tracebuffer functionality to
be enabled and disabled dynamically while the system is running. The
existing DOM0_TBUFCONTROL hypercall is used, and three new operations
have been added: enable, disable, and set_size. This is to address
concerns that use of the trace buffers impacts system performance.

The initial value of opt_tbuf_size is set to zero, so that trace
buffers remain disabled by default. They can be enabled as they used
to be, by adding tbuf_size= to the xen command line at boot time. They
can also be turned on and off any time when the system is running. The
size of the trace buffer allocation can also be changed dynamically
while the system is running. The trace buffers may be completely
deallocated by setting the size to zero. No change in buffer size can
be done while tracing is enabled;

Other Changes made:
 - Update the constants in tools/xentrace/formats to match those in
public/trace.h
 - libxc functions for enable/disable, get/set size
Still left to do:
 - remove all ifdef's for trace buffers and the 'trace' build option
 - xm command to do enable/disable trace buffers and get/set size

Signed-off-by: Rob Gardner <rob.gardner@hp.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 18:23:36 +0000 (19:23 +0100)]
Merged.

20 years agoTry again to get the ptrdiff_t printf right for 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 18:22:31 +0000 (19:22 +0100)]
Try again to get the ptrdiff_t printf right for 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago--- xen-unstable.hg.copy/docs/Makefile 2005-10-28 18:36:33.000000000 -0700
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:20:09 +0000 (17:20 +0100)]
--- xen-unstable.hg.copy/docs/Makefile 2005-10-28 18:36:33.000000000 -0700
+++ xen-unstable.hg/docs/Makefile 2005-10-28 14:58:18.000000000 -0700
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f

+VERSION = xen-unstable
 INSTALL = install
 INSTALL_DIR = $(INSTALL) -d -m0755

@@ -9,9 +10,15 @@
 FIG2DEV := fig2dev
 LATEX2HTML := latex2html
 DOXYGEN := doxygen
+POD2MAN := pod2man

 pkgdocdir := /usr/share/doc/xen
+mandir := /usr/share/man

+DOC_MAN5SRC := $(wildcard man/*.pod.5)
+DOC_MAN1SRC := $(wildcard man/*.pod.1)
+DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
+DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
 DOC_TEX := src/user.tex src/interface.tex
 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
@@ -22,7 +29,7 @@
 .PHONY: all build dev-docs python-dev-docs ps pdf html clean install

 all: build
-build: ps pdf html
+build: ps pdf html man-pages
  rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc

 dev-docs: python-dev-docs
@@ -43,17 +50,36 @@
  $(MAKE) -C api/tools/python/latex ; else                   \
         echo "Doxygen not installed; skipping python-dev-docs."; fi

+man-pages:
+ @if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
+ $(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
+
+man1/%.1: man/%.pod.1 Makefile
+ $(INSTALL_DIR) $(@D)
+ $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man1.//'| \
+ sed 's/.1//'` -s 1 -c "Xen" $< $@
+
+man5/%.5: man/%.pod.5 Makefile
+ $(INSTALL_DIR) $(@D)
+ $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
+ sed 's/.5//'` -s 5 -c "Xen" $< $@
+
 clean:
  rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
  rm -rf *.ilg *.log *.ind *.toc *.bak core
  rm -rf $(GFX) ps pdf html
  rm -rf api
+ rm -rf man5
+ rm -rf man1

 install: all
  rm -rf $(DESTDIR)$(pkgdocdir)
  $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
  cp -dR ps $(DESTDIR)$(pkgdocdir)
  cp -dR pdf $(DESTDIR)$(pkgdocdir)
+ $(INSTALL_DIR) $(DESTDIR)$(mandir)
+ cp -dR man1 $(DESTDIR)$(mandir)
+ cp -dR man5 $(DESTDIR)$(mandir)
  [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)

 pdf/%.pdf: ps/%.ps

20 years agoAdded doccomment.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:19:35 +0000 (17:19 +0100)]
Added doccomment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove misplaced netif_free declaration.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:17:21 +0000 (17:17 +0100)]
Move misplaced netif_free declaration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago This patch is to fix the NIC driven mechanism to make it event
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:47:59 +0000 (16:47 +0100)]
    This patch is to fix the NIC driven mechanism to make it event
driven. We will also send it to Qemu mailing list.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoAdded network-attach and network-detach. Fixes bug #300.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:44:47 +0000 (16:44 +0100)]
Added network-attach and network-detach.  Fixes bug #300.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoForce the devid given to destroyDevice to an integer. This means that that
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:43:52 +0000 (16:43 +0100)]
Force the devid given to destroyDevice to an integer.  This means that that
method copes with the values given to xm network-detach without netif.py having
to intervene.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOnce grant refs run out, netfront prints a nice message, but doesn't set
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:43:05 +0000 (16:43 +0100)]
Once grant refs run out, netfront prints a nice message, but doesn't set
err properly to notify the caller, and the domU crashes. (See bug 183 for
details).

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
20 years agoSmall shadow pagetable fixes.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:40:05 +0000 (16:40 +0100)]
Small shadow pagetable fixes.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xin B Li <xin.b.li@intel.com>
20 years agoAdded -lpthread to qemu-dm link line, in order to compile even without SDL
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:35:06 +0000 (16:35 +0100)]
Added -lpthread to qemu-dm link line, in order to compile even without SDL
installed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the grant table interface so that gnttab_end_foreign_access_ref returns
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:33:05 +0000 (16:33 +0100)]
Change the grant table interface so that gnttab_end_foreign_access_ref returns
an error code if the page is still in use, and gnttab_end_foreign_access takes
a page to free.  This allows us to cope with frontends wanting to end access
while backends are still using pages by, eventually, placing the page and
grant table entry on a list, for freeing later.  At the moment, the page and
grant table entry are leaked, with a diagnostic.

Tidied up netfront.c's clean-up code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded cast to silence warning on 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:25:52 +0000 (16:25 +0100)]
Added cast to silence warning on 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse %tx C99 printf modifier for ptrdiff_t so that this builds on 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 14:54:15 +0000 (15:54 +0100)]
Use %tx C99 printf modifier for ptrdiff_t so that this builds on 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove out: label, to silence warning.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 14:42:02 +0000 (15:42 +0100)]
Remove out: label, to silence warning.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 13:00:35 +0000 (14:00 +0100)]
Merged.

20 years agoDon't schedule work for reboot if work is already scheduled. This fixes a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:52:38 +0000 (13:52 +0100)]
Don't schedule work for reboot if work is already scheduled.  This fixes a
problem whereby migrated domains would shut themselves down immediately,
because the watch from the removal of the control/shutdown node would fire
after the workqueue had started, but before the domain was suspended, meaning
that an additional piece of work was scheduled, which ran immediately after the
domain was resumed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the interface between XendRoot.get_network_script and Vifctl so that a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:48:34 +0000 (13:48 +0100)]
Change the interface between XendRoot.get_network_script and Vifctl so that a
list is passed rather than a single string.  This expands the config-file
interface so that parameters may be passed to the network scripts from the
config file.

Fix XendRoot._logError (missing asterisk before args parameter).

In XendRoot, allow an empty configuration file.  This makes it easier to unit
test code reliant on XendRoot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:45:06 +0000 (13:45 +0100)]
Don't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
no bridge parameter and let the vif-bridge script find one for itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded test_create.py, a test script for create.py. This contains a unit test
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:42:30 +0000 (13:42 +0100)]
Added test_create.py, a test script for create.py.  This contains a unit test
for the command line parsing code in xm create.  To make it easier to test,
create.py has changed in structure around the main(argv) function, adding a new
parseCommandLine function.

Remove a large number of useless parameters, where the opts structure was being
passed all over the place, just to eventually log through it.  Instead two
methods -- err and warn -- have been broken out from the Opts class, and there
is now no need to pass the opts value everywhere.

Change the parsing inside make_config to remove lots of cut-and-pasted cruft.

Change the documentation to the vif command to indicate that the bridge can be
auto-detected.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xen.xm.tests package to build.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:34:12 +0000 (13:34 +0100)]
Added xen.xm.tests package to build.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xen-script-common.sh, for functions common to all scripts, not just the
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:33:17 +0000 (13:33 +0100)]
Added xen-script-common.sh, for functions common to all scripts, not just the
hotplug ones.  Added evalVariables and findCommand functions to that, which we
use to clarify the handling of variables being passed in as command line
variables.

Make vif-bridge able to find the bridge for itself if only one bridge is in
use.  This means that it is not necessary to specify a bridge in many
configurations.  Allow the bridge to be specified on the command line, meaning
that a default may be provided in the xend-config.sxp if desired.

Added xenstore_read_default to xen-hotplug-common.sh, which reads from the
store but uses a given default if the path in the store is not present.  This
is used by vif-bridge to allow the store details (i.e. those given to xm create)
to override the default value given in the xend-config.sxp.

Remove vif-bridge setting -- the value can be specified on the vif-script
command line if necessary.

Added examples for network-nat/vif-nat.

Added lots of big comments.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoPrint out MFN in audit code, for debugging purposes.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:24:45 +0000 (13:24 +0100)]
Print out MFN in audit code, for debugging purposes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFree domain names in xenstat_free_node, fixing small memory leak.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:23:21 +0000 (13:23 +0100)]
Free domain names in xenstat_free_node, fixing small memory leak.

Thanks to Anthony Liguori for spotting the leak.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix floating-point corruption (a nasty race in fp task-switch
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 09:45:49 +0000 (10:45 +0100)]
Fix floating-point corruption (a nasty race in fp task-switch
exception handling).
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a commented-out sanity check for lazy fpu switching.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 08:39:55 +0000 (09:39 +0100)]
Add a commented-out sanity check for lazy fpu switching.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Sat, 29 Oct 2005 08:51:35 +0000 (09:51 +0100)]
merge

20 years agoPrevent event listener socket from being inherited by children.
jbulpin@wicket.uk.xensource.com [Sat, 29 Oct 2005 00:58:00 +0000 (01:58 +0100)]
Prevent event listener socket from being inherited by children.
This was passing down to dhclient which was keeping the 8001 port
open and preventing xend restarting.

Also fixed a case typo in setCloExec

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoRemove next_io_page field from domain structure.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 16:51:37 +0000 (17:51 +0100)]
Remove next_io_page field from domain structure.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up the 'initial mapping' area properly on x86/64.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 16:11:59 +0000 (17:11 +0100)]
Clean up the 'initial mapping' area properly on x86/64.
We must completely blow away mappings of the original
p2m table and the initrd. Those areas eventually get freed
to the memory allocator and other uses of that memory will
get really confused by spurious redundant mappings in the
init mapping area.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix sizeof_vcpu_shift in x86/64 xen_entry.S.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 15:41:11 +0000 (16:41 +0100)]
Fix sizeof_vcpu_shift in x86/64 xen_entry.S.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix reboot logic. An indentation error meant that every second reboot would
emellor@leeni.uk.xensource.com [Fri, 28 Oct 2005 12:02:06 +0000 (13:02 +0100)]
Fix reboot logic.  An indentation error meant that every second reboot would
be refused, with the domain being destroyed instead.

Further fix for reboot logic when using on_reboot=rename-restart: the incorrect
node was being removed once restart has completed, leaving Xend to conclude
later that it had crashed in the middle of a restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThis patch provide local APIC support for vmx guest.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 08:48:46 +0000 (09:48 +0100)]
This patch provide local APIC support for vmx guest.

A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoxm help notes that domid can be used in place of domname.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 17:22:45 +0000 (18:22 +0100)]
xm help notes that domid can be used in place of domname.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoNo side effects in BUG_ON statements in Xen.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 17:21:57 +0000 (18:21 +0100)]
No side effects in BUG_ON statements in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTo allow kernel to handle radically different hypervisors in the future,
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:47:53 +0000 (17:47 +0100)]
To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
20 years agoI've created a patch to get the mini-os to compile in Xen-unstable. The patch
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:43:29 +0000 (17:43 +0100)]
I've created a patch to get the mini-os to compile in Xen-unstable. The patch
is pretty big, but this is mostly because I've replaced hypervisor.h with the
hypercalls.h header file from Linux (which seems easier to maintain
anyway). I've ignored X86_64.

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
20 years agoOriginally in qemu when a IDE dma transfer is started which is triggered
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:29:39 +0000 (17:29 +0100)]
Originally in qemu when a IDE dma transfer is started which is triggered
by access to 0xc000 port in VMX, qemu will blocked there until it
finished. And during that block, there are extra dom switches between
dom0 and idle domain, and VMX can't be resumed. By making real IDE dma
tranfer run in another thread, qemu will return and VMX resume on time
and there are fewer cycle wasted.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
20 years agoThe attached patch fixes 2 issues with the scripts written for the Xen
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:27:04 +0000 (17:27 +0100)]
The attached patch fixes 2 issues with the scripts written for the Xen
access control module and makes the tools more self-explanatory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoThis patch
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:24:06 +0000 (17:24 +0100)]
This patch

* adapts the Xen access control module to recent changes in the "unbound
event channel" interface and its usage
* adds checks that became necessary because of domain structures "hanging
around" in the domain list after domain destruction

This patch is tested on today's xen-unstable with Null, CHWALL, STE,
CHWALL_STE policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>

20 years agoRemove all binaries on make clean.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:20:33 +0000 (17:20 +0100)]
Remove all binaries on make clean.

20 years agoRemove a non-portable and unused error.h, and use signal.h not
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:16:48 +0000 (17:16 +0100)]
Remove a non-portable and unused error.h, and use signal.h not
sys/signal.h (in tools/misc).

20 years agoUse standard int typedefs.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:16:12 +0000 (17:16 +0100)]
Use standard int typedefs.

Signed-off-by: John Levon <levon@movementarian.org>
20 years agoBUG_ON() is a macro very very similar to assert(), and it's a really bad
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:09:01 +0000 (17:09 +0100)]
BUG_ON() is a macro very very similar to assert(), and it's a really bad
idea in general to put statements with side-effects inside such a construct
(for example the BUG_ON() could be compiled away for non-debug builds).

The patch below fixes this for the drivers/xen tree.

I chose the general construct to store the respective return values in a
local var instead of an if (...) BUG(); because it looks like most of these
BUG_ON()'s need to be replaced by real error handling when going towards
production releases anyway, and then the local variable is going to be
needed anyway. (and besides the if construct tends to get unreable due to
the unlikely() etc).

Please apply.

Greetings,
   Arjan van de Ven

20 years agoFix Jerone Young's xenstat / xenstore patch:
emellor@leeni.uk.xensource.com [Thu, 27 Oct 2005 09:53:02 +0000 (10:53 +0100)]
Fix Jerone Young's xenstat / xenstore patch:

Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago* Enable xenstat to use xenstore
jeroney@localhost.localdomain [Thu, 27 Oct 2005 09:19:58 +0000 (10:19 +0100)]
* Enable xenstat to use xenstore
* Have xentop display names instead of DomIDs
  as requested in Bugzilla#311 filed by Ian

20 years agoFix the check for non-existence of the save/restore directories, by using &&
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 15:59:13 +0000 (16:59 +0100)]
Fix the check for non-existence of the save/restore directories, by using &&
rather than -a.  The former shortcuts at the script level, whereas the latter
does not, which means that the backtick-enclosed arguments are evaluated
regardless of the success of preceding tests.

Tidy the aforementioned test into a function of its own.

Add an implementation of usleep for those systems that only have sleep (Debian,
for example).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove exception handler for sxp.ParseError above that for Exception, as the
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:59:29 +0000 (14:59 +0100)]
Move exception handler for sxp.ParseError above that for Exception, as the
latter subsumes the former.  Minor tidy-ups.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoBreak the write_dev function out from block into new block-common.sh, where it
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:58:13 +0000 (14:58 +0100)]
Break the write_dev function out from block into new block-common.sh, where it
can also be used by block-enbd and block-nbd.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded copyright notice.
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:57:16 +0000 (14:57 +0100)]
Added copyright notice.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNew xendomains init script, courtesy of Kurt Garloff:
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:55:32 +0000 (14:55 +0100)]
New xendomains init script, courtesy of Kurt Garloff:

It now allows the user to configure what he wants to be done on
xendomains stop: sysrq, migrate, save, or shutdown.
For this to be safe, a timeout has been introduced (optional).
On start, saved domains may be restored, and not yet started
domains from the auto start dir will be started in addition.
status reports missing domains, restart and reload work as well.

The init script is somewhat SUSE-ish, but it should work on LSB
compliant and on RH based distros as well.

I would appreciate this to be put into tools/examples/init.d/

Signed-off-by: Kurt Garloff <garloff@suse.de>
20 years agoCheck whether dom is NULL when we handle a watch. This might occur if the
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 12:41:00 +0000 (13:41 +0100)]
Check whether dom is NULL when we handle a watch.  This might occur if the
domain has recently been removed from our list, but with a watch still in
flight.  This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded comment.
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 11:06:58 +0000 (12:06 +0100)]
Added comment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove second decleration of .PHONY & cleanup formating
jeroney@localhost.localdomain [Tue, 25 Oct 2005 16:37:00 +0000 (17:37 +0100)]
Remove second decleration of .PHONY & cleanup formating

20 years agoFix format spec for tracing.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 15:00:49 +0000 (16:00 +0100)]
Fix format spec for tracing.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNBD scripts, courtesy of Kurt Garloff:
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:52:56 +0000 (11:52 +0100)]
NBD scripts, courtesy of Kurt Garloff:

For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:24:01 +0000 (11:24 +0100)]
Merged.

20 years agoMoved SuSE-specific getcfg call into a preiftransfer call. The semantics of
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:22:47 +0000 (11:22 +0100)]
Moved SuSE-specific getcfg call into a preiftransfer call.  The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOops, missed hg add of vti example file
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 03:00:35 +0000 (21:00 -0600)]
Oops, missed hg add of vti example file

20 years agoNecessary change to support ia64/vti domain build in common code.
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 02:57:47 +0000 (20:57 -0600)]
Necessary change to support ia64/vti domain build in common code.

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoImage builder for ia64/vti domain, together with a example config file.
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 02:56:53 +0000 (20:56 -0600)]
Image builder for ia64/vti domain, together with a example config file.

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoDon't run network stop script when doing xend stop.
chris@ubuntu.eng.hq.xensource.com [Tue, 25 Oct 2005 02:04:30 +0000 (19:04 -0700)]
Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoCode reordering for (partial) gcc3.4 compatibility
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:41:27 +0000 (11:41 -0600)]
Code reordering for (partial) gcc3.4 compatibility
Signed-off-by Akio Takabe <takebe_akio@jp.fujitsu.com>

20 years agoRemove dup prologue lines
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:32:45 +0000 (11:32 -0600)]
Remove dup prologue lines

20 years agoDefine VHPT constants from VHPT_SIZE_LOG2.
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:31:09 +0000 (11:31 -0600)]
Define VHPT constants from VHPT_SIZE_LOG2.
Prototypes added.